package cn.mw.cmdb.service;

import cn.mw.cmdb.entity.InstanceInfo;
import cn.mw.cmdb.param.InstanceSearchParam;
import cn.mw.components.mongodb.page.MWIPage;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public interface ModelService<T, B> {

    //生成对象
    T genObject();

    Object add(T param) throws Exception;
    boolean update(T param) throws Exception;

    boolean remove(T param) throws Exception;

    Object batchAdd(Object params) throws Exception;

    boolean batchUpdate(Object params) throws Exception;

    boolean batchRemove(B params) throws Exception;

    //根据id查询模型
    T selectById(Object id) throws Exception;

    //查询模型列表
    List<T> selectList(Object param) throws Exception;
}
